package com.hbnu.demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hbnu.demo.bean.User;
import com.hbnu.demo.mapper.UserMapper;
import com.hbnu.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther: hjx
 * @Date: 2023/6/13 15:46
 * @Description:
 */
@Service

public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Override
    public boolean updateUserById(User user) {
        return baseMapper.updateById(user) > 0;
    }

    @Override
    public User selectById(int id) {
        return baseMapper.selectById(id);
    }

    @Override
    public List<User> selectAll() {
        return baseMapper.selectList();
    }
}

